package com.aistar.pojo.pojoOV;

import com.aistar.pojo.ProOrder;
import com.aistar.pojo.Product;

import java.util.Objects;

public class ProductOrderOV {

    private Product product1;
    private ProOrder order1;

    public ProductOrderOV() {
    }

    public ProductOrderOV(Product product1, ProOrder order1) {
        this.product1 = product1;
        this.order1 = order1;
    }

    public Product getProduct1() {
        return product1;
    }

    public void setProduct1(Product product1) {
        this.product1 = product1;
    }

    public ProOrder getOrder1() {
        return order1;
    }

    public void setOrder1(ProOrder order1) {
        this.order1 = order1;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProductOrderOV that = (ProductOrderOV) o;
        return Objects.equals(product1, that.product1) &&
                Objects.equals(order1, that.order1);
    }

    @Override
    public int hashCode() {
        return Objects.hash(product1, order1);
    }

    @Override
    public String toString() {
        return "ProductOrderOV{" +
                "product1=" + product1 +
                ", order1=" + order1 +
                '}';
    }
}
